<script>
import Child from './Child';

export default {
  beforeCreate() {
    console.log('parent before create!');
  },
  created() {
    console.log('parent created!');
  },
  beforeMount() {
    console.log('parent before mount!');
  },
  render(h) {
    console.log('parent render!');
    return (
      <div>
        <h1>Vue中父子组件的挂载顺序</h1>
        <h1>父亲</h1>
        <Child />
      </div>
    );
  },
  mounted() {
    console.log('parent mounted');
    this.$bus.$emit('parentMounted');
  },
  components: {
    Child
  }
};
</script>

<style>
div {
  text-align: center;
}
</style>
